<template>
  <div>
  <LazyLoadTab v-model="activeName" :tabMenus="menus" ></LazyLoadTab>
   <div class="dialogBottmView">
      <el-button @click="closeDialog">关 闭</el-button>
    </div>
  </div>
</template>

<script>
import { getClubById } from '@/api/cms-api/customerManage/clue/createClue';
export default {
  props:{
    value: {
      type: Number,
      default:null
    },
  },
  data() {
    return {
      activeName: '客户基本信息',   //默认选中
      menus:[
          {
            title: '客户基本信息',
            path: 'cms-pages/customerManage/clue/createClue/infoBase', //文件路径
            params: {
              clue:this.clue
            }
          },
          {
            title: '线索分配信息',
            path: 'cms-pages/customerManage/clue/createClue/infoClue',
            params: {
              cluepatch:this.clue
            }
          }],
      clue:{}
    };
  },
  methods: {
      initClub(){
        getClubById(this.value).then(res=>{
          this.clue = res.data;
          this.menus[0].params.clue = this.clue;
          this.menus[1].params.cluepatch = this.clue;
        });  
      },
      closeDialog(){
        this.$emit('close', {visible:false,});
      }
  },
  mounted() {
    this.initClub();
  },
};
</script>
